Repository navigation
Conversation
ZPascal
force-pushed
the
followup-strip-docker-credentials-tests
branch
from
November 24, 2026 17:18
5c7aee3 to
5584a03
Compare
Follow-up to cloudfoundry#1410: - Add a DefaultApplicationsTest case for pushManifestV3 that checks the apply_manifest body has no docker credentials while the package request still gets them. - Move the stripDockerCredentials test to DefaultApplicationsTest and cover several apps, untouched apps and kept fields. - Only skip stripping when both username and password are missing. - Delete the temp manifest files written by ApplicationManifestUtilsV3Test.
- Remove the stripDockerCredentials assertion on the original manifest. ManifestV3 is immutable, so it could never fail, and the push test already checks that createPackage gets the credentials. - Move the two new tests to their alphabetical place in DefaultApplicationsTest.
ZPascal
force-pushed
the
followup-strip-docker-credentials-tests
branch
from
November 24, 2026 18:15
5584a03 to
f6d72f1
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1410. These points came up in review and were moved out of that PR so it didn't have to wait for them.
DefaultApplicationsTestcase forpushManifestV3. It captures both requests and checks that theapply_manifestbody has the image but no username or password, while theCreatePackageRequeststill gets all three. Before this, nothing tested the fix itself, only the static helper.stripDockerCredentialstest fromApplicationManifestUtilsV3TesttoDefaultApplicationsTest. It now covers three apps: a private docker app (credentials removed, other fields kept), a public docker app and a buildpack app (both returned unchanged).stripDockerCredentialsnow leaves an app alone only when username and password are both missing. Today the manifest validation requires both together, so this changes nothing yet. It stops a username from slipping through if that check is ever relaxed.ApplicationManifestUtilsV3Testnow deletes its temp manifest files. Before, every run lefttest-manifest-*.ymlfiles withpassword: secretin the temp dir.Test plan
DefaultApplicationsTestandApplicationManifestUtilsV3Testpass (129 tests)spotless:checkpassesapply_manifest, the new push test fails